1. Field of the Invention
The present invention relates generally to methods for displaying graphic images on a display device. In particular, the present invention relates to a computer implemented method for rendering a graphic image to a display device that compensates for the resolution of the display device. Still more particularly, the present invention relates to a method for rendering a plurality of overlapping windows on a display device that compensates for the resolution of the display device.
2. Description of the Related Art
Present day graphic systems typically provide a "source space" that refers to the source resolution that defines an image. An image is defined in terms of global and/or local coordinates of the source space. The coordinate system that defines an image may either be local or global. "Global space" refers to a global coordinate space (encompassing many other coordinate spaces) that is at source resolution. "Local space" is a coordinate space that is contained within global space that is also at source resolution. It's coordinate space is local to a referenced point in global space. The computer under user direction manipulates and edits an image by changing various parameters of the image in global and/or local coordinates. After the computer has performed all the desired manipulations on the graphic image, the image is rendered upon a display device by converting the image definition from source space into "device space." "Device space" refers to the pixel resolution of the device upon which the image is being rendered. There may be a one to one correspondence between device space and source space (i.e., the same resolution is used in source space as in device space), however, in some cases, the source space must be mapped to device space using a mapping function that accounts for the differences in the resolutions between the source space and device space.
One problem in rendering a graphic image to a display device is gridding. Gridding occurs when mapping an image defined in one resolution to a second different resolution. Images are conventionally defined by specifying the extents and bounds of the image in source space units of the local or global coordinate system. When the image is rendered on the display device, a region containing the image is transformed from source units of the local or global coordinate system to device units or pixels of the display device. The diagram shown in FIG. 1 illustrates the transformation from a source space of 72 dots per inch (dpi) to a device space of 128 dpi. The rounding or truncation function determines how the gridding will take place. As shown in FIG. 1, a source unit is mapped either to one device pixel or two device pixels. For example, source pixel 3 maps to a single device pixel, pixel e, while the adjacent pixel 4 maps to two device pixels f and g. The source unit could be mapped to even more pixels depending on the difference between the resolution of the source space and the device space. The detrimental effects of gridding become even more apparent when considering rendering a line six source units in length. As shown, if the line is drawn from pixel 1 to 6 of source space, the line has a length of 11 pixels from pixels a through k when rendered in device space. If a line of the same length is drawn at pixel 4 to 10 of source space, the length of the line in device space is 12 pixels from f-q. Therefore, the same length line in source space can have different lengths in device space depending on where the line is positioned. This gridding creates problems since the size of windows and other images on the display device change size depending on their position on the display device.
Another problem with graphics systems of the prior art is that the ownership of device pixels is dependent on whether the source space uses local or global coordinates. As illustrated in FIGS. 2A and 2B, the device pixel(s) that corresponds to a particular source pixel varies depending on whether global or local gridding is used. Both FIGS. 2A and 2B show the mapping of ten pixels of source space to seventeen device pixels for a change in resolution from 72 dpi in source space to 128 dpi in device space. In the global space of FIG. 2A, pixel 2 is represented by two device pixels c and d. However, as shown in local space of FIG. 2B, the same pixel 2 is represented by a single device pixel c. The differences in ownership of device pixels is problematic because it prevents the fast transfer of images from off screen to on screen. Because of the differences, many images defined in global coordinates must be translated and processed before display on the screen. This problem of device pixel ownership being dependent on the use of local or global coordinates is particularly problematic for windowing systems. Windows often only cover a portion of the screen of the display device, and therefore their contents are defined in local coordinates. The window border is defined in global coordinates However, the screen background is in global coordinates. Thus, there is conflict over the ownership of device pixels. This conflict is heightened by the fact that the display device can and very often does present a plurality of windows that overlap each other. The overlap of windows adds more competition for the ownership of pixels by two local spaces that have different offsets from global space. Therefore, there is need for a system and method that eliminates the problems with multiple overlapping windows and their local spaces.
Another problem with windowing systems of the prior art is the requirement that the window and its contents be re-drawn each time the window is moved. The prior art must re-draw both the window border and the window contents each time the window is moved. Since windows are generally defined in local coordinates, they must be re-drawn to the coordinate grid of the display device each time the window is moved. This re-drawing process consumes much of the computer's resources, and can slow down the operation of the computer. Moreover, constant display updates are displeasing for the user. Therefore, there is need for a windowing System that eliminates the overhead associated with moving a window.
Some graphic display methods use the origin of the window on a display device as a reference point for performing drawing operations. The window maintains the same device grid independent of its location on the screen of the display device. To scroll the window contents in such an environment requires that the origin of the window be moved in unison with the scrolling operation. Since the origin of the window is limited to the bounds of the coordinate space defined by the graphics system, which is typically a smaller local space, the size of the data that can be scrolled within the window is limited to graphic coordinates as boundaries. Therefore, there is a need for a method that maintains the integrity of the device grid and removes the graphic coordinates as boundaries. Furthermore, when individual windows have their own gridding independent of the global grid, interactions between the windows occur since there is a question of ownership between pixels on the boundary of where the windows overlaps one and another.
Therefore, there is need for methods of resolving the above gridding problems introduced by multiple origins and varying resolutions.